#region Using References

using System;
using System.Diagnostics.CodeAnalysis;

#endregion

namespace Beaker.OpenCube.Specs.Builders
{
	/// <summary>
	/// Abstract baseclass for builds
	/// </summary>
	/// <typeparam name="T">The type of the object the builder will build.</typeparam>
	[ExcludeFromCodeCoverage]
	public abstract class Builder<T>
	{
		/// <summary>
		/// Build the object.
		/// </summary>
		/// <returns>The constructed object.</returns>
		public T Build()
		{
			return OnBuild();
		}

		/// <summary>
		/// Override to construct the requested object.
		/// </summary>
		/// <returns>The object that has been Build.</returns>
		protected abstract T OnBuild();
	}
}